package sample.test.tt{
	import com.takanafu.haruframework.aop.AfterReturningAdvice;
	import com.takanafu.haruframework.aop.reflect.MethodImpl;
	import com.takanafu.haruframework.aopalliance.reflect.Method;
	import com.takanafu.haruframework.d2l.invoker.MethodInfo;
	import com.takanafu.haruframework.d2l.util.ApplicationContext;
	
	import flash.events.Event;
	import flash.net.URLLoader;
	import flash.net.URLRequest;
	
	import mx.collections.ArrayCollection;
	
	import sample.test.ConsoleManager;

	public class AfterUseHandlerThrow implements AfterReturningAdvice{
		private var cm:ConsoleManager;
		
		function AfterUseHandlerThrow(){
			cm = ApplicationContext.getBean("consoleManager") as ConsoleManager;
		}
		
		public function afterReturning(returnValue:Object,m:Method,args:ArrayCollection,target:Object):MethodInfo{
			cm.println("☆after Advice でわざとエラー");
			throw new Error("AfterUseHandlerThrow");
		}
	}
}